package rs.daolao.syc.admin.account.pojo.vo;

import io.github.classgraph.json.Id;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class UsersSearchVO implements Serializable {
    /*
    * 用户Id
    * */
    @Id
    private Long id;

    /*
    * 用户真实名称
    * */
    @Field(type = FieldType.Keyword)
    private String userName;

    /*
    * 用户昵称
    * */
    @Field(type = FieldType.Keyword)
    private String nickName;

    /*
    * 用户手机号码
    * */
    @Field(type = FieldType.Keyword)
    private Long phone;

    /*
    * 用户角色名称
    * */
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String roleName;

    /*
    * 时间处理
    * */
    @Field(type = FieldType.Date,format = {},pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreate;
    @Field(type = FieldType.Date,format = {},pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtModified;
}
